몇 가지 ggplot2 팁 x가 factor일 때 geom_line() x가 factor일 때에는 geom_line()이 그려지지 않는다. 예를 들어, library(ggplot2) library(dplyr) dat = data.frame(gender=sample(c("M", "F"), 100, replace=TRUE), y = rnorm(100) + 10) datMean = dat %>% group_by(gender) %>% summarise(meany=mean(y)) dat %>% ggplot(aes(x=gender, y=y)) + geom_point(alpha=0.3) + geom_line(data=datMean, aes(x=gender, y=meany)) + geom_point(data=datMean, aes(x=gender, y=meany), size=3) ## geom_path: Each group … ggplot2 tips 계속 읽기
임베드 하려면 이 URL을 복사해 자신의 워드프레스 사이트에 붙여넣으세요
임베드 하려면 이 코드를 사이트에 복사해 붙여넣으세요